<?php $this->load->view('header');?>
<div class="page-container">
    <?php $this->load->view('sidebar');?>
    <!-- BEGIN CONTENT -->
    <div class="page-content-wrapper">
        <div class="page-content">
            <?php $this->load->view('sale/_sub_nav');?>
            <div class="row">
                <div class="col-md-12">
                    <?php echo form_open($this->uri->uri_string(), array('class'=>'form-horizontal','role'=>'form')); ?>
                    <div class="form-body">

                        <h3 class="form-section">学员情况</h3>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group<?php echo form_error('student') ? ' has-error' : ''; ?>">
                                    <label class="control-label col-md-3" ><span class="required">*</span>查找学员</label>
                                    <div class="col-md-6">
                                        <input type="text" name="student" class="form-control" id="all_students" style="width:250px" placeholder="支持模糊查找">
                                        <span class="help-block"><?php echo form_error('student'); ?></span>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <h3 class="form-section">教育顾问建议</h3>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group<?php echo form_error('student_info') ? ' has-error' : ''; ?>">
                                    <label class="control-label col-md-3" >学生性格及学习情况</label>
                                    <div class="col-md-6">
                                        <textarea name="student_info" class="form-control"><?php echo set_value('student_info', isset($apply) ? $apply->student_info : ''); ?></textarea>
                                        <span class="help-block"><?php echo form_error('student_info'); ?></span>
                                    </div>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group<?php echo form_error('advice_info') ? ' has-error' : ''; ?>">
                                    <label class="control-label col-md-3" >教育顾问学习建议</label>
                                    <div class="col-md-6">
                                        <textarea name="advice_info" class="form-control"><?php echo set_value('advice_info', isset($apply) ? $apply->advice_info : ''); ?></textarea>
                                        <span class="help-block"><?php echo form_error('advice_info'); ?></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group<?php echo form_error('teacher_info') ? ' has-error' : ''; ?>">
                                    <label class="control-label col-md-3" >对老师的要求</label>
                                    <div class="col-md-6">
                                        <textarea name="teacher_info" class="form-control"><?php echo set_value('teacher_info', isset($apply) ? $apply->teacher_info : ''); ?></textarea>
                                        <span class="help-block"><?php echo form_error('teacher_info'); ?></span>
                                    </div>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group<?php echo form_error('class_info') ? ' has-error' : ''; ?>">
                                    <label class="control-label col-md-3" >允许安排课程和周时</label>
                                    <div class="col-md-6">
                                        <textarea name="class_info" class="form-control"><?php echo set_value('class_info', isset($apply) ? $apply->class_info : ''); ?></textarea>
                                        <span class="help-block"><?php echo form_error('class_info'); ?></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group<?php echo form_error('stay_info') ? ' has-error' : ''; ?>">
                                    <label class="control-label col-md-3" >是否需要陪读</label>
                                    <div class="col-md-6">
                                        <textarea name="stay_info" class="form-control"><?php echo set_value('stay_info', isset($apply) ? $apply->stay_info : ''); ?></textarea>
                                        <span class="help-block"><?php echo form_error('stay_info'); ?></span>
                                    </div>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group<?php echo form_error('other_info') ? ' has-error' : ''; ?>">
                                    <label class="control-label col-md-3" >其他情况和备注</label>
                                    <div class="col-md-6">
                                        <textarea name="other_info" class="form-control"><?php echo set_value('other_info', isset($apply) ? $apply->other_info : ''); ?></textarea>
                                        <span class="help-block"><?php echo form_error('other_info'); ?></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <h3 class="form-section"><?php echo lang('system_info'); ?></h3>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group<?php echo form_error('consultant') ? ' has-error' : ''; ?>">
                                <label class="control-label col-md-3" ><?php echo lang('consultant'); ?></label>
                                <div class="col-md-9">
                                    <select name="consultant" id="consultant" class="form-control" >
                                        <?php if (isset($consultants) && is_array($consultants) && count($consultants)) :?>
                                            <?php foreach ($consultants as $consultant) :?>
                                                <option value="<?php echo $consultant['id']; ?>" <?php echo set_select('consultant', $consultant['id'], $consultant['id']); ?>>
                                                    <?php echo(ucfirst($consultant['nickname'])); ?>
                                                </option>
                                            <?php endforeach; ?>
                                            <option value="0">无</option>
                                        <?php endif;?>
                                    </select>
                                    <span class="help-block"><?php echo form_error('consultant'); ?></span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="form-actions fluid">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="col-md-offset-3 col-md-9">
                                    <button type="submit" class="btn green" name="save"><?php echo lang('action_save');?></button>
                                    <a href="<?php echo site_url('/sale/tracks');?>" class="btn default"><?php echo lang('action_cancel');?></a>
                                </div>
                            </div>
                            <div class="col-md-6">
                            </div>
                        </div>
                    </div>
                    <?php echo form_close();?>
                </div>
            </div>
        </div>
    </div>    <!-- END CONTENT -->
</div>




<?php $this->load->view('footer');?>

<link rel="stylesheet" type="text/css" href="assets/plugins/select2/select2.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/select2/select2-metronic.css"/>
<script type="text/javascript" src="assets/plugins/select2/select2.min.js"></script>

<script type="text/javascript" src="assets/scripts/custom/apply.js"></script>

<script>
    jQuery(document).ready(function() {
        App.init(); // initlayout and core plugins
        Apply.init();
    });
</script>

</body>
<!-- END BODY -->
</html>

